package com.finace.money.data.http;

import com.finace.money.data.bean.AddressBean;
import com.finace.money.data.bean.AnalyseListBean;
import com.finace.money.data.bean.BannerBean;
import com.finace.money.data.bean.BaseBean;
import com.finace.money.data.bean.DealRecordListBean;
import com.finace.money.data.bean.EmptyBean;
import com.finace.money.data.bean.ImageBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * Created by ZHP on 2017/6/25.
 */

public interface ApiService {

    //banner
    @FormUrlEncoded
    @POST
    Observable<BaseBean<BannerBean>> getBanner(@Url String path, @FieldMap Map<String, String> map);

    /*
     * 通用接口
     * 发送验证码、检查手机号
     */
    @FormUrlEncoded
    @POST
    Observable<BaseBean<EmptyBean>> backEmpty(@Url String path, @FieldMap Map<String, String> map);

    //资讯、攻略
    @FormUrlEncoded
    @POST
    Observable<BaseBean<DealRecordListBean>> getList(@Url String path, @FieldMap Map<String, String> map);

    //获取图片验证码
    @FormUrlEncoded
    @POST
    Observable<BaseBean<ImageBean>> getImageCode(@Url String path, @FieldMap Map<String, String> map);

    //行情分析接口
    @FormUrlEncoded
    @POST
    Observable<BaseBean<AnalyseListBean>> getAnalyseList(@Url String path, @FieldMap Map<String, String> map);

    //省市级接口
    @FormUrlEncoded
    @POST
    Observable<BaseBean<List<AddressBean>>> getAddress(@Url String path, @FieldMap Map<String, String> map);

    //省市级接口
//    @Multipart
    @POST
    Observable<BaseBean<EmptyBean>> register(@Url String path,  @Body RequestBody body);
}
